//清除浮动
@mixin clearfix() {
    &::after {
      content: "";
      display: table;
      clear: both;
    }
}
  
//设置宽高
@mixin size($width, $height:auto) {
    width: $width;
    height: $height;
}

//rem 函数(px转rem)  例：使用：width: rem(100);
@function rem($val,$rem_grid:100){
    $rem : $val / $rem_grid;
    @if $rem == 0 {
        @return #{$rem} ;
    }@else{
        @return $rem / ($rem * 0 + 1) * 1rem;
    }
}